<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">

<!-- 引入样式 -->
<link rel="stylesheet" href="${base}/plugin/element/index.css">
<script src="${base}/plugin/vue/vue.js"></script>
<script src="${base}/plugin/element/index.js"></script>
<script src="${base}/js/axios.min.js"></script>

<title>凯卫导航</title>
</head>
<body>


	<div id="guideDiv">
        <div v-for="(item,i) in itemList" >
            <el-divider content-position="left" >{{item.indexName}}  </el-divider>
            
            <el-link v-for="(siteItem,j) in itemList[i].list"  :href="siteItem.url" target="_blank" type="primary">
               <i class="el-icon-eleme" type="primary" ></i>
               <el-link :href="siteItem.url" target="_blank" type="primary" >{{siteItem.siteName}}</el-link>     &nbsp;&nbsp;
            </el-link>
        </div>
	</div>


	<script type="text/javascript">
	var content = new Vue({
		  el: '#guideDiv',
		  data: {
		        ruleForm: {
		        	title: '',
		        	tags: '',
		        	fileName:''
		          },
		          dialogImageUrl: '',
		          dialogVisible: false,
		          disabled: false,
		          itemList:''
		  },
		  methods: {
		        submitForm() {
		        	alert("已经成功!");
		        },
		        loadTableData: function () {
			    	  const formParams = new FormData()
			          formParams.append('type', '01')
			          this.noAyncHttp('${base}' + '/guide/list', formParams).then((res) => {
			            this.itemList= res.data
			          }, (error) => {
			            console.error('出错了', error)
			          })
			        },
			      noAyncHttp (url, params) {
			  		  return new Promise(function (resolve, reject) {
			  		    axios
			  		      .post(url, params)
			  		      .then((response) => {
			  		        resolve(response.data)
			  		        }
			  		      )
			  		      .catch((error) => { // 请求失败处理
			  		        reject(error)
			  		      })
			  		  })
			  	  }
		     }
		})
	
	
	content.loadTableData();
</script>	
</body>
</html>